package com.wanxi.model;

public class Student extends Worker {

    private String sid;


    public Student() {
//        super();
        System.out.println("Student无参构造方法");
    }

    public Student(String sid, String name, int age) {

        super(name, age);
        System.out.println("Student的全参数构造方法");
        this.sid = sid;
    }

    public Student(String sid) {
//        super();
        System.out.println("Student有参数的构造方法");
        this.sid = sid;
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public void study() {
        System.out.println("学习");
    }

    @Override
    public String toString() {
        return "Student{" +
                "sid='" + sid + '\'' +
                ",name='" + getName() + '\'' +
                ", age=" + getAge() +
                '}';
    }
}
